home *** CD-ROM | disk | FTP | other *** search
- function loadImage(mc, node, extrapath)
- {
- var _loc3_ = extrapath;
- if(_loc3_ == null)
- {
- _loc3_ = "";
- }
- var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
- var _loc1_ = node.firstChild.nodeValue;
- var _loc2_ = node.attributes.path;
- if(_loc2_ != null)
- {
- _loc1_ = _loc2_ + _loc1_;
- }
- else
- {
- _loc1_ = strDefaultPath + _loc3_ + _loc1_;
- }
- if(strPathPrefix == null)
- {
- strPathPrefix = "";
- }
- mc.loadMovie(strPathPrefix + _loc1_);
- }
- function init()
- {
- nmCurrentImage = 0;
- PREVIEW_PATH = nodeData.attributes.imagepath;
- var _loc2_ = undefined;
- var _loc3_ = undefined;
- var strFile;
- len = nmImagesTotal = nodeData.childNodes.length;
- var _loc1_ = 0;
- while(_loc1_ < len)
- {
- _loc2_ = this.createEmptyMovieClip("mc_image_" + _loc1_,++depth);
- _loc2_._visible = false;
- _loc3_ = _loc2_.createEmptyMovieClip("mc_file",++depth);
- strFile = nodeData.childNodes[_loc1_].byName("image").getText();
- _loc3_.onLoad = fileLoaded;
- loadImage(_loc3_,nodeData.childNodes[_loc1_].byName("image"),PREVIEW_PATH);
- _loc1_ = _loc1_ + 1;
- }
- _loc2_ = this.createEmptyMovieClip("mc_image_" + len,++depth);
- _loc2_._visible = false;
- _loc3_ = _loc2_.createEmptyMovieClip("mc_file",++depth);
- _loc3_.onLoad = fileLoaded;
- nmCurrentImage = len;
- loadImage(_loc3_,_parent.ndDefault.byName("image"),PREVIEW_PATH);
- }
- function exit()
- {
- delete mc_front;
- delete mc_back;
- this.removeAllMovieClips();
- }
- function doOver(num)
- {
- default_image = this["mc_image_" + len];
- default_image._visible = false;
- showCurrentImage(num);
- }
- function doOut()
- {
- mc_image = this["mc_image_" + len];
- mc_image._visible = true;
- current_image = this["mc_image_" + nmCurrentImage];
- current_image._visible = false;
- }
- function showCurrentImage(nextnum)
- {
- nmCurrentImage = nextnum;
- mc_back = this["mc_image_" + nmCurrentImage];
- mc_back._visible = true;
- }
- function fileLoaded()
- {
- this.onLoad = null;
- nmImagesLoaded++;
- if(nmImagesLoaded == nmImagesTotal)
- {
- allImagesLoaded();
- }
- }
- function allImagesLoaded()
- {
- this["mc_image_" + len]._visible = true;
- onComplete();
- }
- nmImagesLoaded = 0;
- depth = 0;
- this.onReady();
- this.onUnload = function()
- {
- clearFadeDelay();
- mc_front.onEnterFrame = null;
- };
-